
import { defineStore } from "pinia";
import { constantRoute } from "../../router/constantRouter";


let useUserstore = defineStore('User', {
    state: () => {
        return {
            userName:  '',
            token: null,
            menuRoutes: constantRoute,

        }
    },
    actions: {
        userlogin(data) {
            console.log('8888', data);
            this.userName = localStorage.getItem('username') ? localStorage.getItem('username') :'';

        },
        // 退出登录
        userlogout() {
            console.log("退出登录");
            
           
        }
    },
    getters: {

    }
})

export default useUserstore;